Micron Document
Fox's Git Mirrors

Node / rns-mirrors / Reticulum-Go.git / files / pkg / debug / syslog_unix.go

Displaying Raw • Download

pkg/debug/syslog_unix.go 61af5556362c8bdf7c09a1c01bc84f81629f281b (61af5556) Text, 497 B

// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2024-2026 Quad4.io

//go:build unix && !linux && !haiku

package debug

import (
"fmt"
"io"
"log/syslog"
)

func openSyslogWriter(tag string) (io.Writer, error) {
if tag == "" {
tag = "reticulum-go"
}
w, err := syslog.New(syslog.LOG_DAEMON|syslog.LOG_INFO, tag)
if err != nil {
return nil, fmt.Errorf("syslog: %w", err)
}
return w, nil
}

func openJournaldWriter(tag string) (io.Writer, error) {
return openSyslogWriter(tag)
}

Served by rngit 1.5.2 - Generated in 0.02s